home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 0a | 50 61 74 68 3a 20 45 55 |.lang.c.|Path: EU|
|00000020| 2e 6e 65 74 21 73 75 6e | 34 6e 6c 21 72 69 76 6d |.net!sun|4nl!rivm|
|00000030| 21 6e 65 77 73 0a 46 72 | 6f 6d 3a 20 22 41 2e 20 |!news.Fr|om: "A. |
|00000040| 76 61 6e 20 4b 65 73 73 | 65 6c 22 20 3c 69 6d 61 |van Kess|el" <ima|
|00000050| 61 76 6b 3e 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |avk>.Sub|ject: Re|
|00000060| 3a 20 51 75 65 73 74 69 | 6f 6e 20 6f 6e 20 48 65 |: Questi|on on He|
|00000070| 61 70 20 4d 65 6d 6f 72 | 79 0a 43 6f 6e 74 65 6e |ap Memor|y.Conten|
|00000080| 74 2d 54 79 70 65 3a 20 | 74 65 78 74 2f 70 6c 61 |t-Type: |text/pla|
|00000090| 69 6e 3b 20 63 68 61 72 | 73 65 74 3d 75 73 2d 61 |in; char|set=us-a|
|000000a0| 73 63 69 69 0a 4d 65 73 | 73 61 67 65 2d 49 44 3a |scii.Mes|sage-ID:|
|000000b0| 20 3c 44 6f 4b 77 45 49 | 2e 44 4b 49 40 72 69 76 | <DoKwEI|.DKI@riv|
|000000c0| 6d 2e 6e 6c 3e 0a 54 6f | 3a 20 62 72 79 61 6e 40 |m.nl>.To|: bryan@|
|000000d0| 70 75 62 6c 69 63 2e 63 | 6f 6d 70 75 73 75 6c 74 |public.c|ompusult|
|000000e0| 2e 6e 66 2e 63 61 0a 53 | 65 6e 64 65 72 3a 20 6e |.nf.ca.S|ender: n|
|000000f0| 65 77 73 40 72 69 76 6d | 2e 6e 6c 0a 43 6f 6e 74 |ews@rivm|.nl.Cont|
|00000100| 65 6e 74 2d 54 72 61 6e | 73 66 65 72 2d 45 6e 63 |ent-Tran|sfer-Enc|
|00000110| 6f 64 69 6e 67 3a 20 37 | 62 69 74 0a 4f 72 67 61 |oding: 7|bit.Orga|
|00000120| 6e 69 7a 61 74 69 6f 6e | 3a 20 52 69 6a 6b 73 69 |nization|: Rijksi|
|00000130| 6e 73 74 69 74 75 75 74 | 20 76 6f 6f 72 20 56 6f |nstituut| voor Vo|
|00000140| 6c 6b 73 67 65 7a 6f 6e | 64 68 65 69 64 20 65 6e |lksgezon|dheid en|
|00000150| 20 4d 69 6c 69 65 75 68 | 79 67 69 65 6e 65 2c 20 | Milieuh|ygiene, |
|00000160| 42 69 6c 74 68 6f 76 65 | 6e 2c 20 4e 4c 0a 52 65 |Bilthove|n, NL.Re|
|00000170| 66 65 72 65 6e 63 65 73 | 3a 20 3c 34 69 6e 69 72 |ferences|: <4inir|
|00000180| 67 24 39 71 76 40 68 6f | 62 62 65 73 2e 63 6f 6d |g$9qv@ho|bbes.com|
|00000190| 70 75 73 75 6c 74 2e 6e | 66 2e 63 61 3e 0a 4d 69 |pusult.n|f.ca>.Mi|
|000001a0| 6d 65 2d 56 65 72 73 69 | 6f 6e 3a 20 31 2e 30 0a |me-Versi|on: 1.0.|
|000001b0| 44 61 74 65 3a 20 57 65 | 64 2c 20 32 30 20 4d 61 |Date: We|d, 20 Ma|
|000001c0| 72 20 31 39 39 36 20 31 | 38 3a 32 33 3a 30 35 20 |r 1996 1|8:23:05 |
|000001d0| 47 4d 54 0a 58 2d 4d 61 | 69 6c 65 72 3a 20 4d 6f |GMT.X-Ma|iler: Mo|
|000001e0| 7a 69 6c 6c 61 20 31 2e | 31 4e 20 28 58 31 31 3b |zilla 1.|1N (X11;|
|000001f0| 20 49 3b 20 4f 53 46 31 | 20 56 33 2e 30 20 61 6c | I; OSF1| V3.0 al|
|00000200| 70 68 61 29 0a 58 2d 55 | 72 6c 3a 20 6e 65 77 73 |pha).X-U|rl: news|
|00000210| 3a 34 69 6e 69 72 67 24 | 39 71 76 40 68 6f 62 62 |:4inirg$|9qv@hobb|
|00000220| 65 73 2e 63 6f 6d 70 75 | 73 75 6c 74 2e 6e 66 2e |es.compu|sult.nf.|
|00000230| 63 61 0a 0a 22 42 61 72 | 72 79 20 41 2e 20 52 79 |ca.."Bar|ry A. Ry|
|00000240| 61 6e 22 20 3c 62 72 79 | 61 6e 40 70 75 62 6c 69 |an" <bry|an@publi|
|00000250| 63 2e 63 6f 6d 70 75 73 | 75 6c 74 2e 6e 66 2e 63 |c.compus|ult.nf.c|
|00000260| 61 3e 20 77 72 6f 74 65 | 3a 0a 3e 48 69 20 0a 3e |a> wrote|:.>Hi .>|
|00000270| 0a 3e 49 73 20 74 68 65 | 72 65 20 61 20 77 61 79 |.>Is the|re a way|
|00000280| 20 74 6f 20 64 65 63 6c | 61 72 65 20 61 20 6c 61 | to decl|are a la|
|00000290| 72 67 65 20 73 74 72 75 | 63 74 75 72 65 20 69 6e |rge stru|cture in|
|000002a0| 20 74 68 65 20 68 65 61 | 70 20 61 72 65 61 20 6f | the hea|p area o|
|000002b0| 66 0a 3e 6d 65 6d 6f 72 | 79 20 77 69 74 68 6f 75 |f.>memor|y withou|
|000002c0| 74 20 75 73 69 6e 67 20 | 6d 61 6c 6c 6f 63 3f 20 |t using |malloc? |
|000002d0| 20 41 20 67 6c 6f 62 61 | 6c 20 73 74 72 75 63 74 | A globa|l struct|
|000002e0| 75 72 65 20 75 73 65 73 | 20 74 68 65 0a 3e 67 6c |ure uses| the.>gl|
|000002f0| 6f 62 61 6c 20 61 72 65 | 61 20 6f 66 20 6d 65 6d |obal are|a of mem|
|00000300| 6f 72 79 2c 20 61 20 6c | 6f 63 61 6c 20 75 73 65 |ory, a l|ocal use|
|00000310| 73 20 74 68 65 20 73 74 | 61 63 6b 2e 20 20 48 6f |s the st|ack. Ho|
|00000320| 77 20 63 61 6e 20 0a 3e | 73 70 61 63 65 20 62 65 |w can .>|space be|
|00000330| 20 61 6c 6c 6f 63 61 74 | 65 64 2f 72 65 73 65 72 | allocat|ed/reser|
|00000340| 76 65 64 20 69 6e 20 74 | 68 65 20 68 65 61 70 20 |ved in t|he heap |
|00000350| 61 72 65 61 20 77 69 74 | 68 20 61 20 73 74 72 75 |area wit|h a stru|
|00000360| 63 74 75 72 65 20 0a 3e | 64 65 63 6c 61 72 61 74 |cture .>|declarat|
|00000370| 69 6f 6e 20 73 75 63 68 | 20 61 73 2f 73 69 6d 69 |ion such| as/simi|
|00000380| 6c 61 72 20 74 6f 3a 0a | 3e 0a 3e 20 73 74 72 75 |lar to:.|>.> stru|
|00000390| 63 74 20 6d 61 74 72 69 | 78 7b 0a 3e 09 69 6e 74 |ct matri|x{.>.int|
|000003a0| 20 61 3b 0a 3e 09 69 6e | 74 20 62 3b 0a 3e 20 20 | a;.>.in|t b;.> |
|000003b0| 20 20 20 20 20 20 66 6c | 6f 61 74 20 63 3b 0a 3e | fl|oat c;.>|
|000003c0| 09 65 74 63 2e 0a 3e 09 | 65 74 63 2e 0a 3e 09 7d |.etc..>.|etc..>.}|
|000003d0| 20 6d 61 74 72 69 78 31 | 5b 31 30 30 30 5d 5b 31 | matrix1|[1000][1|
|000003e0| 30 30 30 5d 3b 0a 3e 0a | 3e 44 75 65 20 74 6f 20 |000];.>.|>Due to |
|000003f0| 74 68 65 20 73 69 7a 65 | 20 49 20 6e 65 65 64 20 |the size| I need |
|00000400| 74 6f 20 75 73 65 20 61 | 6c 6c 6f 74 20 6f 66 20 |to use a|llot of |
|00000410| 68 65 61 70 20 73 70 61 | 63 65 2e 20 43 61 6e 20 |heap spa|ce. Can |
|00000420| 69 74 20 62 65 20 64 6f | 6e 65 20 0a 3e 77 69 74 |it be do|ne .>wit|
|00000430| 68 6f 75 74 20 6d 61 6c | 6c 6f 63 3f 0a 3e 0a 3e |hout mal|loc?.>.>|
|00000440| 0a 0a 49 66 20 79 6f 75 | 20 6e 65 65 64 20 74 68 |..If you| need th|
|00000450| 65 20 73 70 61 63 65 2c | 20 79 6f 75 20 73 68 6f |e space,| you sho|
|00000460| 75 6c 64 20 61 6c 6c 6f | 63 61 74 65 20 69 74 20 |uld allo|cate it |
|00000470| 65 69 74 68 65 72 20 73 | 74 61 74 69 63 61 6c 6c |either s|taticall|
|00000480| 79 2c 20 6f 72 0a 64 79 | 6e 61 6d 69 63 61 6c 6c |y, or.dy|namicall|
|00000490| 79 2e 0a 41 6e 64 20 77 | 68 65 6e 20 79 6f 75 20 |y..And w|hen you |
|000004a0| 73 74 61 72 74 20 61 64 | 64 72 65 73 73 69 6e 67 |start ad|dressing|
|000004b0| 20 69 74 2c 20 79 6f 75 | 27 64 20 62 65 74 74 65 | it, you|'d bette|
|000004c0| 72 20 62 65 20 73 75 72 | 65 20 69 74 27 73 20 74 |r be sur|e it's t|
|000004d0| 68 65 72 65 2e 0a 0a 4e | 6f 2c 20 79 6f 75 20 64 |here...N|o, you d|
|000004e0| 6f 6e 27 74 20 68 61 76 | 65 20 74 6f 20 75 73 65 |on't hav|e to use|
|000004f0| 20 6d 61 6c 6c 6f 63 28 | 29 20 65 74 20 61 6c 2e | malloc(|) et al.|
|00000500| 20 4d 61 6c 6c 6f 63 20 | 69 73 20 6a 75 73 74 20 | Malloc |is just |
|00000510| 61 20 6c 69 62 72 61 72 | 79 20 72 6f 75 74 69 6e |a librar|y routin|
|00000520| 65 0a 61 72 6f 75 6e 64 | 20 73 6f 6d 65 20 22 73 |e.around| some "s|
|00000530| 79 73 74 65 6d 2d 63 61 | 6c 6c 73 22 20 2c 20 75 |ystem-ca|lls" , u|
|00000540| 73 75 61 6c 6c 79 20 73 | 62 72 6b 28 29 20 74 68 |sually s|brk() th|
|00000550| 61 74 20 64 6f 20 74 68 | 65 20 72 65 61 6c 20 74 |at do th|e real t|
|00000560| 68 69 6e 67 2e 20 4d 61 | 6c 6c 6f 63 0a 64 6f 65 |hing. Ma|lloc.doe|
|00000570| 73 20 74 68 65 20 62 6f | 6f 6b 6b 65 65 70 69 6e |s the bo|okkeepin|
|00000580| 67 20 77 69 74 68 69 6e | 20 79 6f 75 72 20 70 72 |g within| your pr|
|00000590| 6f 67 72 61 6d 20 28 22 | 61 72 65 6e 61 22 29 2c |ogram ("|arena"),|
|000005a0| 20 74 68 65 20 73 79 73 | 74 65 6d 2d 72 6f 75 74 | the sys|tem-rout|
|000005b0| 69 6e 65 73 20 64 6f 0a | 74 68 65 20 62 6f 6f 6b |ines do.|the book|
|000005c0| 6b 65 65 70 69 6e 67 20 | 6f 75 74 73 69 64 65 20 |keeping |outside |
|000005d0| 79 6f 75 72 20 70 72 6f | 67 72 61 6d 2e 0a 59 6f |your pro|gram..Yo|
|000005e0| 75 20 63 61 6e 20 70 72 | 6f 76 69 64 65 20 79 6f |u can pr|ovide yo|
|000005f0| 75 72 20 6f 77 6e 20 6b | 69 6e 64 20 6f 66 20 6d |ur own k|ind of m|
|00000600| 61 6c 6c 6f 63 2f 66 72 | 65 65 2e 20 54 68 69 73 |alloc/fr|ee. This|
|00000610| 20 63 61 6e 20 62 65 20 | 68 61 6e 64 79 0a 69 66 | can be |handy.if|
|00000620| 20 79 6f 75 20 61 72 65 | 20 22 61 6c 6f 6e 65 22 | you are| "alone"|
|00000630| 20 6f 6e 20 74 68 65 20 | 6d 61 63 68 69 6e 65 2c | on the |machine,|
|00000640| 20 73 75 63 68 20 61 73 | 20 61 20 64 65 64 69 63 | such as| a dedic|
|00000650| 61 74 65 64 20 6d 61 63 | 68 69 6e 65 2f 65 6d 62 |ated mac|hine/emb|
|00000660| 65 64 64 65 64 0a 63 6f | 6e 74 72 6f 6c 6c 65 72 |edded.co|ntroller|
|00000670| 2c 20 77 68 69 74 68 6f | 75 74 20 61 20 73 65 70 |, whitho|ut a sep|
|00000680| 61 72 61 74 65 20 4f 53 | 2e 0a 0a 42 75 74 20 77 |arate OS|...But w|
|00000690| 68 61 74 65 76 65 72 20 | 77 61 79 20 79 6f 75 20 |hatever |way you |
|000006a0| 64 65 63 6c 61 72 65 2f | 64 65 66 69 6e 65 2f 61 |declare/|define/a|
|000006b0| 6c 6c 6f 63 61 74 65 20 | 74 68 65 20 6d 65 6d 6f |llocate |the memo|
|000006c0| 72 79 20 3a 0a 49 54 20 | 48 41 53 20 54 4f 20 45 |ry :.IT |HAS TO E|
|000006d0| 58 49 53 54 20 21 20 28 | 65 69 74 68 65 72 20 61 |XIST ! (|either a|
|000006e0| 73 20 72 61 6d 20 6f 72 | 20 61 73 20 76 69 72 74 |s ram or| as virt|
|000006f0| 75 61 6c 20 6d 65 6d 6f | 72 79 29 2e 0a 0a 4a 75 |ual memo|ry)...Ju|
|00000700| 73 74 20 73 74 69 63 6b | 20 77 69 74 68 20 6d 61 |st stick| with ma|
|00000710| 6c 6c 6f 63 28 29 20 74 | 68 65 20 6f 76 65 72 68 |lloc() t|he overh|
|00000720| 65 61 64 20 69 73 20 74 | 79 70 69 63 61 6c 6c 79 |ead is t|ypically|
|00000730| 20 73 6f 6d 65 20 38 20 | 62 79 74 65 73 20 70 65 | some 8 |bytes pe|
|00000740| 72 0a 63 68 75 6e 6b 2e | 0a 49 66 20 79 6f 75 20 |r.chunk.|.If you |
|00000750| 77 61 6e 74 20 74 6f 20 | 72 65 64 75 63 65 20 79 |want to |reduce y|
|00000760| 6f 75 72 20 6d 65 6d 6f | 72 79 20 75 73 61 67 65 |our memo|ry usage|
|00000770| 2c 20 72 65 74 68 69 6e | 6b 20 79 6f 75 72 20 64 |, rethin|k your d|
|00000780| 61 74 61 3b 20 68 6f 77 | 20 6d 75 63 68 0a 6f 66 |ata; how| much.of|
|00000790| 20 74 68 65 20 31 30 30 | 30 2a 20 31 30 30 30 20 | the 100|0* 1000 |
|000007a0| 2a 20 58 58 58 20 61 72 | 72 61 79 20 61 63 74 75 |* XXX ar|ray actu|
|000007b0| 61 6c 6c 79 20 63 6f 6e | 74 61 69 6e 73 20 6e 6f |ally con|tains no|
|000007c0| 6e 2d 74 72 69 76 69 61 | 6c 20 64 61 74 61 20 3f |n-trivia|l data ?|
|000007d0| 0a 0a 0a 48 61 70 70 79 | 20 68 61 63 6b 69 6e 67 |...Happy| hacking|
|000007e0| 2c 0a 41 64 72 69 61 61 | 6e 20 76 61 6e 20 4b 65 |,.Adriaa|n van Ke|
|000007f0| 73 73 65 6c 2e 0a 0a | |ssel... | |
+--------+-------------------------+-------------------------+--------+--------+